@keyframes morph {
  0% {
    border-radius: 50% 48% 52% 50% / 50% 52% 48% 50%;
  }
  25% {
    border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
  }
  50% {
    border-radius: 50% 52% 48% 50% / 55% 50% 50% 45%;
  }
  75% {
    border-radius: 48% 50% 52% 50% / 50% 48% 52% 50%;
  }
  100% {
    border-radius: 50% 48% 52% 50% / 50% 52% 48% 50%;
  }
}

@keyframes spin {
  100% {
    transform: rotate(1turn);
  }
}

.bg-blob-ani {
  border-radius: 50%;
  animation: morph 18s linear infinite alternate, spin 30s linear infinite;
  will-change: border-radius, transform;
}
/* 登录/注册切换Tab样式 */
.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}
.auth-tab {
    background: none;
    border: none;
    outline: none;
    font-size: 18px;
    font-weight: 600;
    color: #888;
    padding: 8px 32px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.auth-tab.active {
    color: #ffffff;
    background: rgba(255,255,255,0.7);
    box-shadow: 0 2px 8px rgba(45,140,240,0.08);
}

body {
    min-height: 100vh;
    background-color: #76614b;
    background-image: url("https://www.transparenttextures.com/patterns/food.png");
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed;
    overflow-x: hidden;
}

.form-container {
    margin: 80px auto 0 auto;
    width: 380px;
    background: rgba(50, 38, 38, 0.874); 
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 18px;
    border: 1.5px solid rgba(255,255,255,0.08);
    padding: 36px 32px 28px 32px;
    color: #e3e3e3;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: box-shadow 0.3s, background 0.3s;
}

.form-container::before {
    content: '';
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    z-index: -1;
    background: transparent; 
    pointer-events: none;
}

.form-container {
    margin: 80px auto 0 auto;
    width: 380px;
    background: rgb(112, 97, 75); 
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.65);
    backdrop-filter: blur(18px);
    border-radius: 18px;
    padding: 38px 32px 32px 32px;
    z-index: 1;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #d2b48c; /* 将标签文字改为棕褐色 */
    font-size: 15px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 7px;
    border: 1.5px solid; /* 边框改为 saddle brown 色 */
    background: rgba(255,248,220,0.15); /* 米白色背景提高可读性 */
    color: #fff; /* 保持白色文字 */
    font-size: 15px;
    outline: none;
    transition: border 0.2s, background 0.2s;
}

.form-group input:focus {
    border: 1.5px solid #cd853f; /* 聚焦时边框变为秘鲁色 */
    background: rgba(255,248,220,0.25); /* 聚焦时提高背景透明度 */
}

/* 头像上传样式 */
.form-group input[type="file"] {
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border: 1.5px dashed #5a3e13;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    background: rgba(45,140,240,0.05);
    border-color: #6a3c11;
}

.avatar-preview {
    text-align: center;
    margin-top: 10px;
}

.avatar-preview img {
    transition: transform 0.3s ease;
}

.avatar-preview img:hover {
    transform: scale(1.05);
}

.btn {
    width: 100%;
    padding: 10px 0;
    background: #52443b;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 2px 16px rgba(139, 69, 19, 0.2);
    transition: background 0.2s, box-shadow 0.2s;
}
.btn:hover {
    background:rgba(49, 41, 33, 0.85); 
    box-shadow: 0 4px 24px rgba(139, 69, 19, 0.3); /* 增强阴影 */
}

.flashes {
    margin-bottom: 18px;
    padding-left: 0;
}
.form-container a {
    color: #cd853f; /* 链接改为秘鲁色 */
    text-decoration: none;
    transition: color 0.2s;
}
.form-container a:hover {
    color: #8b4513; /* 悬停时加深颜色 */
}

.flashes li {
    list-style: none;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 15px;
    background: rgba(210, 180, 140, 0.15); /* 浅棕背景 */
    color: #ffd700; /* 金色文字 */
    border-left: 4px solid #ffd700; /* 金色左侧边框 */
}
.flashes li.success {
    color: #00e676;
    border-left: 4px solid #00e676;
}

.form-container p {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
}
.form-container a {
    color: #2d8cf0;
    text-decoration: none;
    transition: color 0.2s;
}
.form-container a:hover {
    color: #1e6bb8;
}

/* 粒子效果容器样式 */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}
